Skip to content

Conversation

@frauzufall
Copy link
Member

  • Prevent printing of log message if message is null

How to reproduce:

DefaultLogger log = new DefaultLogger(System.out::println, LogSource.newRoot(), LogLevel.INFO);
try {
	((Object)null).equals(null);
} catch (NullPointerException e) {
	log.error(e);
}

.. prints:

[ERROR] null
java.lang.NullPointerException
	at org.scijava.log.LogTest.run(LogTest.java:12)

With this PR, it prints

[ERROR] java.lang.NullPointerException
	at org.scijava.log.LogTest.run(LogTest.java:12)

* Prevent printing of log message if message is null
@ctrueden ctrueden merged commit 6ebe5ec into master Oct 16, 2019
@ctrueden
Copy link
Member

Thank you!

@ctrueden ctrueden deleted the logmessage-fix-null branch October 16, 2019 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants